home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invisible Universe
/
Invisible Universe (1995)(Voyager)[Mac-PC].iso
/
mac
/
UNIVERSE
/
SHARED.DIR
/
01001_Script_shared movie script
next >
Wrap
Text File
|
1995-11-21
|
8KB
|
372 lines
--celestial bodies shared script
on startMoviexxx
put "Using STUB for startMovie Handler !!"
beep
beep
end
on startMovie
--put ">>>shared startMovie" && the movieName
global gCOM --gCOM: is true if the movie is a celestial objects movie
global gSS
if gSS then exit
set the keyDownScript to "checkKeyDowns"
put char 1 of the movieName = "O" into gCOM
--setSpritesVisible
setUpCelestialObjectStuff
pass
end startMovie
on setupFixPal
if the machineType <> 256 then
global gFixPalShared
openxlib "FixPalette XObj"
set gFixPalShared=FixPalette(mNew, the stageLeft, the stageTop, the stageRight, the stageTop)
end if
end setupFixPal
on toggleHotSpots
if the visibility of sprite 12 = 1 then
hideHotSpots
else
infoClose
updateStage
infoDesc
showHotSpots
end if
end toggleHotSpots
on hideHotSpots
global gCOM
-- dmd these seem to be for the other views and info buttons
-- seem to be for hotspots and other views
global gTSEnabled
set gTSEnabled = 0
set the mouseDownScript to empty
repeat with i = 12 to 21
set the visible of sprite i to not(gCOM)
end repeat
end
on showHotSpots
-- dmd these seem to be for the other views and info buttons
-- seem to be for hotspots and other views
global gLastHot, gCurLabelProp, gHotSpotList
if voidP(gLastHot) then set gLastHot = -1
if gLastHot <> gCurLabelProp then
--
--
-- Update the hotspot/close up list
-- numbered 1, 2, 3 for scopes, and -1, -2, -3
-- for text
--
set gHotSpotList = [:]
set scope = 0
set text = 0
repeat with i = 12 to 21
set cn = the castNum of sprite i
if cn = 0 then next repeat
if the name of cast cn = "SCOPE.PIC" then
set scope = scope + 1
setAProp gHotSpotList, i, scope
else
set text = text - 1
setAProp gHotSpotList, i, text
end if
end repeat
end if
repeat with i = 12 to 21
set the visible of sprite i to 1
end repeat
end showHotSpots
on showButtons
-- hide the navigation buttons
repeat with i = 22 to 25
set the visibility of sprite i = 1
end repeat
set the visibility of sprite 11 = 1 -- Fiorella Button
end showButtons
on hideButtons
-- hide the navigation buttons
repeat with i = 22 to 25
set the visibility of sprite i = 0
end repeat
if the castNum of sprite 11 <> 0 then
set the visibility of sprite 11 = 0 -- Fiorella Button
end if
end hideButtons
on unHideAll
global gNavPalette, gPalCloseTIcks
global gHideAll
if the ticks > (gPalCloseTIcks + 45) then
set gHideAll = 0
set the mouseDownScript to empty
tell gNavPalette to lOpenNavPalette
--moveToFront gNavPalette
showName
showButtons
updateStage
end if
--repeat while the mouseDown
--end repeat
end unHideAll
on hideAllButImage
global gHideAll, gNavPalette
set gHideAll = 1
hideHotSpots
infoClose
hideName
hideButtons
--updateStage
--tell gNavPalette to idle
-- beep
set the mouseDownScript to "unHideAll"
end hideAllButImage
on hidePalette
set the mouseDownScript to "showPalette"
end hidePalette
on showPalette
global gNavPalette, gPalCloseTIcks
if the ticks > (gPalCloseTicks + 45) then
set the mouseDownScript to empty
tell gNavPalette to lOpenNavPalette
end if
end showPalette
on setSpritesVisible
showHotSpots
infoOpen
end setSpritesVisible
on updatePalPopUpsxxx -- moved to _NAV
global gNavPalette, gNavOffScreen
setUpView
setUpPhoto
tell the stage to setUpHotSpots
if gNavOffScreen then tell gNavPalette to lOpenNavPalette
end updatePalPopUps
on setUpHotSpots
global gNavPalette
updateStage
repeat with i = 12 to 21
if the castNum of sprite i > 0 then
set a = the castNum of sprite i
if a = 0 then next repeat
--put ">>> cast num again = " & a
--put ">>> cast 1001 enable hot spots: chan: " & i && "Frame " & the frame && ¼
"castNum = " & the castNum of sprite i
tell gNavPalette to enableHotSpots
exit
end if
end repeat
tell gNavPalette to disableHotSpots
--put ">>> cast 1001 disable hot spots"
end setUpHotSpots
on setUpPhotoxxx -- movied
global gCurLabelList, gNavPalette, gCurLabelProp
if count(gCurLabelList) > 2 then
set lists = getAt(gCurLabelList, 3)
set photos = getAProp(lists, #PHOTOS)
end if
tell gNavPalette to setPhotosPopUp(photos)
end setUpPhoto
on setUpViewxxx -- moved to _NAV
global gNavPalette, gCurLabelProp, gLabels
global gUpdateViewsMenuP --, gLastFrame
--put ">>>setUpView"
if not gUpdateViewsMenuP then exit
--set gLastFrame = -1
--put ">>>setUpView... updating"
--
--
-- Get the label list for the MAIN view, as this controls the views menu
--
set mainView = getMainView(string(gCurLabelProp))
--put ">>> mainView" && mainView
set MainLabelList = getAProp(gLabels, mainView)
if count(MainlabelList) > 2 then
set lists = getAt(MainLabelList, 3)
set views = getAProp(lists, #VIEWS)
end if
if voidP(views) then
set byType = 1
else if (count(views) = 1) then
set byType = 1
else
set byType = 0
end if
if byType then
set s = char 5 of (string(gCurLabelProp))
-- set s = string(gCurLabelProp)
-- set s = char length(s) of s
tell gNavPalette to setView(views, s)
else
tell gNavPalette to setView(views)
end if
end setUpView
on setUpCelestialObjectStuff
global gCOM, gUpdateNavPalette
global gGlossPalette, gNavPalette, gRollOverLock
if gCOM then
updateStage
if voidP(gNavPalette) then
createNavPalette
end if
if the machineType = 256 then set gRollOverLock = 1
hideHotSpots
infoClose
set the visibility of sprite 48 = 0
go to the frame + 1
if the frame <> label((objectLabel() && "Video"))+1 then setupHistandDataEtc
if voidP(gCOButtons) then
cursor 4
--put ">>> buildgcobuttons"
buildgCOButtons
--put ">>> set coglobals"
setCOGlobals
end if
--put ">>> open nav palette"
set gUpdateNavPalette = 1
openNavPalette
cursor -1
end if
end setUpCelestialObjectStuff
on buildgCOButtons
end buildgCOButtons
on shortSB c,s
global gCOButtons
addprop gCOButtons, c, birth(script "sb",c,s)
end
on shortSBscroll c,s
global gCOButtons
addprop gCOButtons, c, birth(script "sbscroll",c,s)
end
on shortSBTVideo c, s
global gCOButtons
addprop gCOButtons, c, birth(script "sbtVideo", c, s)
end
on shortSBT c, n, r, p, s
global gCOButtons
addprop gCOButtons, c, birth(script "sbt",n, c, r, p, s)
end
on shortSBTRetrace c, n, r, p, s
global gCOButtons
addprop gCOButtons, c, birth(script "sbt-retrace",n, c, r, p, s)
end
on setCOGlobals
global gCurrChan,gFirsChan,gLastChan,gPrevHilite
put 29 into gCurrChan
put 7 into gFirsChan
put 29 into gLastChan
put 0 into gPrevHilite
end setCOGlobals
on exitFrame
global gCOM
if gCOM then go to the frame
end exitFrame